<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>广告位信息 Slide Form</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <link rel="stylesheet" th:href="@{/statics/layui/css/layui.css}" media="all"/>
    <link rel="stylesheet" th:href="@{/statics/style/admin.css}" media="all"/>
</head>
<body>

<div class="layui-form" lay-filter="layuiadmin-form-slide" id="layuiadmin-form-slide" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入广告位名称"
                   class="layui-input" th:value="${slide.title}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">代码</label>
        <div class="layui-input-block">
            <input type="text" name="code" lay-verify="required" autocomplete="off" placeholder="请输入广告位代码"
                   class="layui-input" th:value="${slide.code}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-block">
            <select name="type">
                <option value="image" th:selected="${'image' == slide.type ? 'true':'false'}">图片</option>
                <option value="video" th:selected="${'video' == slide.type ? 'true':'false'}">视频</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">宽度</label>
        <div class="layui-input-block">
            <input type="text" name="width" autocomplete="off" placeholder="请输入广告位宽度" class="layui-input" th:value="${slide.width}"/>
            <div class="layui-form-mid layui-word-aux">广告位尺寸单位为px</div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">高度</label>
        <div class="layui-input-block">
            <input type="text" name="height" autocomplete="off" placeholder="请输入广告位高度" class="layui-input" th:value="${slide.height}"/>
            <div class="layui-form-mid layui-word-aux">广告位尺寸单位为px</div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <textarea name="description" placeholder="广告位描述"  class="layui-textarea">[[${slide.description}]]</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="hidden" name="id" th:value="${slide.id}" class="layui-input"/>
        <input type="hidden" name="lang" th:value="${lang}" class="layui-input"/>
        <button class="layui-btn" lay-submit lay-filter="LAY-slide-add-submit" id="LAY-slide-add-submit">提交</button>
    </div>
</div>

<script th:src="@{/statics/layui/layui.js}"></script>
<script>
    layui.config({
        base: '/statics/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form'], function () {
        var $ = layui.$
            , form = layui.form;
    })
</script>
</body>
</html>